-- GENERATED SPELL FOR [Unchained Doombringer] --


function spell0_20900(pUnit, Event) --@Agonizing Armor,n/a--
pUnit:FullCastSpellOnTarget(36836,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20900', 557, 1)
end

function spell1_20900(pUnit, Event) --@Berserker Charge,n/a--
pUnit:FullCastSpellOnTarget(36833,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20900', 661, 1)
end

function spell2_20900(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(38911,pUnit)
pUnit:RegisterEvent('Sorts_20900', 5280, 1)
end

function spell3_20900(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(36835,pUnit)
pUnit:RegisterEvent('Sorts_20900', 5285, 1)
end

function Sorts_20900(pUnit, Event)
local choix_sorts_20900 = math.random(0, 3)
if choix_sorts_20900 == 0 then
pUnit:RegisterEvent('spell0_20900', 1, 1)
end
if choix_sorts_20900 == 1 then
pUnit:RegisterEvent('spell1_20900', 1, 1)
end
if choix_sorts_20900 == 2 then
pUnit:RegisterEvent('spell2_20900', 1, 1)
end
if choix_sorts_20900 == 3 then
pUnit:RegisterEvent('spell3_20900', 1, 1)
end
end

function mob20900_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20900', math.random(1500, 3000), 1)
end

function mob20900_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20900_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20900_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20900, 1, 'mob20900_Action')
RegisterUnitEvent(20900, 2, 'mob20900_Leave')
RegisterUnitEvent(20900, 3, 'mob20900_Kill')
RegisterUnitEvent(20900, 4, 'mob20900_Die')
